home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
diskmags
/
0022-3.564
/
dmg-3417
/
gfa_prog.s
/
gfamusic.txt
< prev
Wrap
Text File
|
1989-04-05
|
3KB
|
68 lines
SOUNDCHIP MUSIC GFA
YAMAHA SOUNDCHIP MUSIC IN GFA.
Most of the guys out there want to make a demo in GFA but often don't
have music for it or they have but can't play it from GFA. So here it
is your help in distress. Here is a routine to make these musics work
from GFA basic. You can use it for your demo or in your game or what
ever. Every music we used in this magazine and in diskmagazine issue 1
you can play with this routine, so try it out.
Mind the line in MUSIX_ON, use music%+8 for diskmagazine 2 music and
use music%+4 for diskmagazine 1 music.
INLINE music%,22000
' ! inline is for reserving some space to
' ! put the music in.
DIM reg%(16) ! dimension some space
'
DO ! oke lets start...
FILESELECT "a:\music\*.thk","",fnam$! fileselector to choose music.
IF fnam$<>"" ! if name isn't nothing then
BLOAD fnam$,music% ! load music into reserved space
musix_on ! gosub routine to start music
~INP(2) ! wait for key press
- Remember you don't have to want for a key, your own routine
- could also be here, for exp. an scrolline, tracking sprites or
- something else. Just remove the ~inp(2) and put in your own
- routine.
musix_off ! stop music
ELSE ! if name is nothing then
musix_off ! stop music
END ! back to basic or if compiled desktop
ENDIF ! end
LOOP ! goto start again to do it all over again
PROCEDURE musix_on
do%=GEMDOS(&H20,L:0) ! supervisor mode
reg%(0)=1 ! choose music
RCALL music%,reg%() ! music call
SLPOKE &H4D2,music%+8 ! begin address music diskmagazine 2
' SLPOKE &H4D2,music%+4 ! begin address music diskmagazine 1
~GEMDOS(&H20,L:do%) ! user mode
RETURN
'
PROCEDURE musix_off
do%=GEMDOS(&H20,L:0) ! supervisor mode
SLPOKE &H4D2,0 ! stop music
WAVE 0,0,0,0 ! all sound off
~GEMDOS(&H20,L:do%) ! user mode kiezen
RETURN
'
'
So i hope you understand all this, in the folder GFA_PROG.S is a file
called GFAMUSIC.LST and you can MERGE it in GFA basic 3.xx. Well i
hope you have some us for it, an if you have some nice routines in GFA
please send them in so other readers can use them. We all have to help
one an other to get the best out of GFA basic, oke ???
'
If you still have some questions about it then write to us, and maybe
we write you back or will write about it in the next issue of the
D.B.A. magazine.
Keep on Programming...
Bonus Software